<?php

namespace App\Http\Controllers\Home;

use App\Exceptions\AdminException;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\URL;

class IndexController extends Controller
{


    public function index(){

        echo 111;die;

//        throw new AdminException([
//            'code' => 10001,
//            'msg'  => '参数错误!'
//        ]);

    }

    public function test(){
        echo 23232;
    }


    public function urldemo(){

        // 获取当前 URL 没有 query string...
//        echo url()->current();
//        // 获取当前 URL 包括 query string...
//        echo url()->full();
//        // 获取上个请求 URL
//        echo url()->previous();

//        echo URL::current();

        // 生成命名路由
//        echo route('post.show', ['post' => 1]);

        // 生成签名url
//        return URL::signedRoute('unsubscribe', ['user' => 1]);

//        控制器行为的 URL
//        $url = action([IndexController::class, 'index']);
//        echo $url;


    }



}
